package com.qfedu.qfoffice.service.impl;

import com.qfedu.qfoffice.dao.GradeDao;
import com.qfedu.qfoffice.entity.Grade;
import com.qfedu.qfoffice.service.GradeService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GradeServiceImpl  implements GradeService {
    @Autowired
    private GradeDao gradeDao;


    @Override
    public List<Grade> selectGradeAll() {
        return gradeDao.selectGradeAll();
    }

    @Override
    public int insertGrade(@Param("uno") String uno,@Param("name") String name,@Param("createtime") String createtime, @Param("week") int week, @Param("location") String location) {

        return gradeDao.insertGrade( uno,name,createtime,week,location);
    }

    @Override
    public int gradeupdate(Grade grade) {
        return gradeDao.gradeUpdate(grade);
    }

    @Override
    public int deleteGradeById(int id) {
        return gradeDao.deleteGradeById(id);
    }


}
